package org.ftc.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/**
 * 中介表
 * @author Creasy Ho
 *
 */
@Entity
@Table(name = "CT_MAP")
//@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class CTMap extends BasicEntity implements Serializable  {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3842831811774964136L;

	@Id 
	@Column(name = "CT_SEQ", length = 50 )
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	private String ctSeq;
	
	@ManyToOne
	@JoinColumn(name = "CODE", nullable = false)
	private Committee committee;
	@Transient
	private String cCode;
	
	@ManyToOne
	@JoinColumn(name = "T_CODE", nullable = false)
	private CommitteeTeam committeeTeam;
	@Transient
	private String tCode;
	
	@Column(name = "SORT") 
	private Integer sort;

	public String getCtSeq() {
		return ctSeq;
	}

	public void setCtSeq(String ctSeq) {
		this.ctSeq = ctSeq;
	}

	public Committee getCommittee() {
		return committee;
	}

	public void setCommittee(Committee committee) {
		this.committee = committee;
	}

	public String getcCode() {
		return cCode;
	}

	public void setcCode(String cCode) {
		this.cCode = cCode;
	}

	public CommitteeTeam getCommitteeTeam() {
		return committeeTeam;
	}

	public void setCommitteeTeam(CommitteeTeam committeeTeam) {
		this.committeeTeam = committeeTeam;
	}

	public String gettCode() {
		return tCode;
	}

	public void settCode(String tCode) {
		this.tCode = tCode;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}


	
}
